| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/ash/panel_view_aura.h" | 5 #include "chrome/browser/ui/views/ash/panel_view_aura.h" |
| 6 | 6 |
| 7 #include "ash/wm/panel_frame_view.h" | 7 #include "ash/wm/panel_frame_view.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 10 #include "chrome/browser/extensions/extension_process_manager.h" | 10 #include "chrome/browser/extensions/extension_process_manager.h" |
| 11 #include "chrome/browser/extensions/extension_system.h" | 11 #include "chrome/browser/extensions/extension_system.h" |
| 12 #include "chrome/browser/extensions/extension_tab_util.h" | 12 #include "chrome/browser/extensions/extension_tab_util.h" |
| 13 #include "chrome/browser/extensions/extension_tabs_module_constants.h" | 13 #include "chrome/browser/extensions/extension_tabs_module_constants.h" |
| 14 #include "chrome/browser/extensions/extension_window_controller.h" | 14 #include "chrome/browser/extensions/extension_window_controller.h" |
| 15 #include "chrome/browser/extensions/extension_window_list.h" | 15 #include "chrome/browser/extensions/extension_window_list.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/sessions/session_id.h" | 17 #include "chrome/browser/sessions/session_id.h" |
| 18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
| 19 #include "chrome/browser/ui/browser_finder.h" | 19 #include "chrome/browser/ui/browser_finder.h" |
| 20 #include "chrome/common/chrome_view_type.h" | 20 #include "chrome/browser/view_type_utils.h" |
| 21 #include "chrome/common/extensions/extension.h" | 21 #include "chrome/common/extensions/extension.h" |
| 22 #include "chrome/common/extensions/extension_messages.h" | 22 #include "chrome/common/extensions/extension_messages.h" |
| 23 #include "content/public/browser/site_instance.h" | 23 #include "content/public/browser/site_instance.h" |
| 24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
| 25 #include "content/public/browser/web_contents_delegate.h" | 25 #include "content/public/browser/web_contents_delegate.h" |
| 26 #include "content/public/browser/web_contents_observer.h" | 26 #include "content/public/browser/web_contents_observer.h" |
| 27 #include "googleurl/src/gurl.h" | 27 #include "googleurl/src/gurl.h" |
| 28 #include "ipc/ipc_message.h" | 28 #include "ipc/ipc_message.h" |
| 29 #include "ipc/ipc_message_macros.h" | 29 #include "ipc/ipc_message_macros.h" |
| 30 #include "ui/aura/window.h" | 30 #include "ui/aura/window.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 | 101 |
| 102 PanelHost::~PanelHost() { | 102 PanelHost::~PanelHost() { |
| 103 } | 103 } |
| 104 | 104 |
| 105 void PanelHost::Init(const GURL& url) { | 105 void PanelHost::Init(const GURL& url) { |
| 106 site_instance_ = content::SiteInstance::CreateForURL(profile_, url); | 106 site_instance_ = content::SiteInstance::CreateForURL(profile_, url); |
| 107 | 107 |
| 108 web_contents_.reset(content::WebContents::Create( | 108 web_contents_.reset(content::WebContents::Create( |
| 109 profile_, site_instance_.get(), MSG_ROUTING_NONE, NULL, NULL)); | 109 profile_, site_instance_.get(), MSG_ROUTING_NONE, NULL, NULL)); |
| 110 web_contents_->SetViewType(chrome::VIEW_TYPE_PANEL); | 110 chrome::SetViewType(web_contents_.get(), chrome::VIEW_TYPE_PANEL); |
| 111 web_contents_->SetDelegate(this); | 111 web_contents_->SetDelegate(this); |
| 112 Observe(web_contents_.get()); | 112 Observe(web_contents_.get()); |
| 113 | 113 |
| 114 web_contents_->GetController().LoadURL( | 114 web_contents_->GetController().LoadURL( |
| 115 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); | 115 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); |
| 116 } | 116 } |
| 117 | 117 |
| 118 ExtensionWindowController* PanelHost::GetExtensionWindowController() const { | 118 ExtensionWindowController* PanelHost::GetExtensionWindowController() const { |
| 119 return panel_view_->extension_window_controller(); | 119 return panel_view_->extension_window_controller(); |
| 120 } | 120 } |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 } | 440 } |
| 441 | 441 |
| 442 void PanelViewAura::FlashFrame(bool flash) { | 442 void PanelViewAura::FlashFrame(bool flash) { |
| 443 // TODO(stevenjb): Implement | 443 // TODO(stevenjb): Implement |
| 444 NOTIMPLEMENTED(); | 444 NOTIMPLEMENTED(); |
| 445 } | 445 } |
| 446 | 446 |
| 447 bool PanelViewAura::IsAlwaysOnTop() const { | 447 bool PanelViewAura::IsAlwaysOnTop() const { |
| 448 return true; | 448 return true; |
| 449 } | 449 } |
| OLD | NEW |