| 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/api/tabs/tabs_constants.h" | 9 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" |
| 10 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 10 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 extension_function_dispatcher_(profile, this)) { | 100 extension_function_dispatcher_(profile, this)) { |
| 101 } | 101 } |
| 102 | 102 |
| 103 PanelHost::~PanelHost() { | 103 PanelHost::~PanelHost() { |
| 104 } | 104 } |
| 105 | 105 |
| 106 void PanelHost::Init(const GURL& url) { | 106 void PanelHost::Init(const GURL& url) { |
| 107 site_instance_ = content::SiteInstance::CreateForURL(profile_, url); | 107 site_instance_ = content::SiteInstance::CreateForURL(profile_, url); |
| 108 | 108 |
| 109 web_contents_.reset(content::WebContents::Create( | 109 web_contents_.reset(content::WebContents::Create( |
| 110 profile_, site_instance_.get(), MSG_ROUTING_NONE, NULL, NULL)); | 110 profile_, site_instance_.get(), MSG_ROUTING_NONE, NULL)); |
| 111 chrome::SetViewType(web_contents_.get(), chrome::VIEW_TYPE_PANEL); | 111 chrome::SetViewType(web_contents_.get(), chrome::VIEW_TYPE_PANEL); |
| 112 web_contents_->SetDelegate(this); | 112 web_contents_->SetDelegate(this); |
| 113 Observe(web_contents_.get()); | 113 Observe(web_contents_.get()); |
| 114 | 114 |
| 115 web_contents_->GetController().LoadURL( | 115 web_contents_->GetController().LoadURL( |
| 116 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); | 116 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); |
| 117 } | 117 } |
| 118 | 118 |
| 119 extensions::WindowController* PanelHost::GetExtensionWindowController() const { | 119 extensions::WindowController* PanelHost::GetExtensionWindowController() const { |
| 120 return panel_view_->extension_window_controller(); | 120 return panel_view_->extension_window_controller(); |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 } | 453 } |
| 454 | 454 |
| 455 void PanelViewAura::FlashFrame(bool flash) { | 455 void PanelViewAura::FlashFrame(bool flash) { |
| 456 // TODO(stevenjb): Implement | 456 // TODO(stevenjb): Implement |
| 457 NOTIMPLEMENTED(); | 457 NOTIMPLEMENTED(); |
| 458 } | 458 } |
| 459 | 459 |
| 460 bool PanelViewAura::IsAlwaysOnTop() const { | 460 bool PanelViewAura::IsAlwaysOnTop() const { |
| 461 return true; | 461 return true; |
| 462 } | 462 } |
| OLD | NEW |