[safe-browsing] Database full hash matches like prefix match.
[chromium-blink-merge.git] / content / shell / browser / shell_aura.cc
blobccfa1f61d54d30b5432b7fdc7bc8e20a3e7fb3f6
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/shell/browser/shell.h"
7 #include "content/public/browser/web_contents.h"
8 #include "content/public/browser/web_contents_view.h"
9 #include "content/shell/browser/shell_platform_data_aura.h"
10 #include "ui/aura/env.h"
11 #include "ui/aura/test/test_screen.h"
12 #include "ui/aura/window.h"
13 #include "ui/aura/window_event_dispatcher.h"
15 namespace content {
17 // static
18 void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
19 CHECK(!platform_);
20 aura::TestScreen* screen = aura::TestScreen::Create();
21 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen);
22 platform_ = new ShellPlatformDataAura(default_window_size);
25 void Shell::PlatformExit() {
26 CHECK(platform_);
27 delete platform_;
28 platform_ = NULL;
29 aura::Env::DeleteInstance();
32 void Shell::PlatformCleanUp() {
35 void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
38 void Shell::PlatformSetAddressBarURL(const GURL& url) {
41 void Shell::PlatformSetIsLoading(bool loading) {
44 void Shell::PlatformCreateWindow(int width, int height) {
45 CHECK(platform_);
46 if (!headless_)
47 platform_->ShowWindow();
48 platform_->ResizeWindow(gfx::Size(width, height));
51 void Shell::PlatformSetContents() {
52 CHECK(platform_);
53 aura::Window* content = web_contents_->GetView()->GetNativeView();
54 aura::Window* parent = platform_->host()->window();
55 if (parent->Contains(content))
56 return;
57 parent->AddChild(content);
58 content->Show();
61 void Shell::PlatformResizeSubViews() {
64 void Shell::Close() {
65 delete this;
68 void Shell::PlatformSetTitle(const base::string16& title) {
71 bool Shell::PlatformHandleContextMenu(
72 const content::ContextMenuParams& params) {
73 return false;
76 } // namespace content