| 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_tab_util.h" | 10 #include "chrome/browser/extensions/extension_tab_util.h" |
| 11 #include "chrome/browser/extensions/extension_tabs_module_constants.h" | 11 #include "chrome/browser/extensions/extension_tabs_module_constants.h" |
| 12 #include "chrome/browser/extensions/extension_window_controller.h" | 12 #include "chrome/browser/extensions/extension_window_controller.h" |
| 13 #include "chrome/browser/extensions/extension_window_list.h" | 13 #include "chrome/browser/extensions/extension_window_list.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/sessions/session_id.h" | 15 #include "chrome/browser/sessions/session_id.h" |
| 16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
| 17 #include "chrome/browser/ui/browser_list.h" | 17 #include "chrome/browser/ui/browser_finder.h" |
| 18 #include "chrome/common/chrome_view_type.h" | 18 #include "chrome/common/chrome_view_type.h" |
| 19 #include "chrome/common/extensions/extension_messages.h" | 19 #include "chrome/common/extensions/extension_messages.h" |
| 20 #include "content/public/browser/site_instance.h" | 20 #include "content/public/browser/site_instance.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/browser/web_contents_delegate.h" | 22 #include "content/public/browser/web_contents_delegate.h" |
| 23 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
| 24 #include "googleurl/src/gurl.h" | 24 #include "googleurl/src/gurl.h" |
| 25 #include "ipc/ipc_message.h" | 25 #include "ipc/ipc_message.h" |
| 26 #include "ipc/ipc_message_macros.h" | 26 #include "ipc/ipc_message_macros.h" |
| 27 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 } | 133 } |
| 134 | 134 |
| 135 // This handles launching a new page from within the panel. | 135 // This handles launching a new page from within the panel. |
| 136 // TODO(stevenjb): Determine whether or not this is the desired/expected | 136 // TODO(stevenjb): Determine whether or not this is the desired/expected |
| 137 // behavior for panels. | 137 // behavior for panels. |
| 138 void PanelHost::AddNewContents(content::WebContents* source, | 138 void PanelHost::AddNewContents(content::WebContents* source, |
| 139 content::WebContents* new_contents, | 139 content::WebContents* new_contents, |
| 140 WindowOpenDisposition disposition, | 140 WindowOpenDisposition disposition, |
| 141 const gfx::Rect& initial_pos, | 141 const gfx::Rect& initial_pos, |
| 142 bool user_gesture) { | 142 bool user_gesture) { |
| 143 Browser* browser = BrowserList::GetLastActiveWithProfile( | 143 Browser* browser = browser::FindLastActiveWithProfile( |
| 144 Profile::FromBrowserContext(new_contents->GetBrowserContext())); | 144 Profile::FromBrowserContext(new_contents->GetBrowserContext())); |
| 145 if (!browser) | 145 if (!browser) |
| 146 return; | 146 return; |
| 147 browser->AddWebContents(new_contents, disposition, initial_pos, user_gesture); | 147 browser->AddWebContents(new_contents, disposition, initial_pos, user_gesture); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void PanelHost::RenderViewCreated(content::RenderViewHost* render_view_host) { | 150 void PanelHost::RenderViewCreated(content::RenderViewHost* render_view_host) { |
| 151 } | 151 } |
| 152 | 152 |
| 153 void PanelHost::RenderViewReady() { | 153 void PanelHost::RenderViewReady() { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 } | 415 } |
| 416 | 416 |
| 417 void PanelViewAura::FlashFrame(bool flash) { | 417 void PanelViewAura::FlashFrame(bool flash) { |
| 418 // TODO(stevenjb): Implement | 418 // TODO(stevenjb): Implement |
| 419 NOTIMPLEMENTED(); | 419 NOTIMPLEMENTED(); |
| 420 } | 420 } |
| 421 | 421 |
| 422 bool PanelViewAura::IsAlwaysOnTop() const { | 422 bool PanelViewAura::IsAlwaysOnTop() const { |
| 423 return true; | 423 return true; |
| 424 } | 424 } |
| OLD | NEW |