| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/extensions/api/tabs/ash_panel_contents.h" | 5 #include "chrome/browser/extensions/api/tabs/ash_panel_contents.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.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/api/tabs/tabs_windows_api.h" | 10 #include "chrome/browser/extensions/api/tabs/tabs_windows_api.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // bridge to support instantiating AppWindows from v1 apps, specifically | 31 // bridge to support instantiating AppWindows from v1 apps, specifically |
| 32 // for creating Panels in Ash. See crbug.com/160645. | 32 // for creating Panels in Ash. See crbug.com/160645. |
| 33 class AshPanelWindowController : public extensions::WindowController { | 33 class AshPanelWindowController : public extensions::WindowController { |
| 34 public: | 34 public: |
| 35 AshPanelWindowController(AppWindow* window, Profile* profile); | 35 AshPanelWindowController(AppWindow* window, Profile* profile); |
| 36 virtual ~AshPanelWindowController(); | 36 virtual ~AshPanelWindowController(); |
| 37 | 37 |
| 38 void NativeWindowChanged(); | 38 void NativeWindowChanged(); |
| 39 | 39 |
| 40 // Overridden from extensions::WindowController. | 40 // Overridden from extensions::WindowController. |
| 41 virtual int GetWindowId() const OVERRIDE; | 41 virtual int GetWindowId() const override; |
| 42 virtual std::string GetWindowTypeText() const OVERRIDE; | 42 virtual std::string GetWindowTypeText() const override; |
| 43 virtual base::DictionaryValue* CreateWindowValueWithTabs( | 43 virtual base::DictionaryValue* CreateWindowValueWithTabs( |
| 44 const extensions::Extension* extension) const OVERRIDE; | 44 const extensions::Extension* extension) const override; |
| 45 virtual base::DictionaryValue* CreateTabValue( | 45 virtual base::DictionaryValue* CreateTabValue( |
| 46 const extensions::Extension* extension, int tab_index) const OVERRIDE; | 46 const extensions::Extension* extension, int tab_index) const override; |
| 47 virtual bool CanClose(Reason* reason) const OVERRIDE; | 47 virtual bool CanClose(Reason* reason) const override; |
| 48 virtual void SetFullscreenMode(bool is_fullscreen, | 48 virtual void SetFullscreenMode(bool is_fullscreen, |
| 49 const GURL& extension_url) const OVERRIDE; | 49 const GURL& extension_url) const override; |
| 50 virtual bool IsVisibleToExtension( | 50 virtual bool IsVisibleToExtension( |
| 51 const extensions::Extension* extension) const OVERRIDE; | 51 const extensions::Extension* extension) const override; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 AppWindow* app_window_; // Weak pointer; this is owned by app_window_ | 54 AppWindow* app_window_; // Weak pointer; this is owned by app_window_ |
| 55 bool is_active_; | 55 bool is_active_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(AshPanelWindowController); | 57 DISALLOW_COPY_AND_ASSIGN(AshPanelWindowController); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 AshPanelWindowController::AshPanelWindowController(AppWindow* app_window, | 60 AshPanelWindowController::AshPanelWindowController(AppWindow* app_window, |
| 61 Profile* profile) | 61 Profile* profile) |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 content::WebContents* AshPanelContents::GetAssociatedWebContents() const { | 239 content::WebContents* AshPanelContents::GetAssociatedWebContents() const { |
| 240 return web_contents_.get(); | 240 return web_contents_.get(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void AshPanelContents::OnRequest( | 243 void AshPanelContents::OnRequest( |
| 244 const ExtensionHostMsg_Request_Params& params) { | 244 const ExtensionHostMsg_Request_Params& params) { |
| 245 extension_function_dispatcher_->Dispatch( | 245 extension_function_dispatcher_->Dispatch( |
| 246 params, web_contents_->GetRenderViewHost()); | 246 params, web_contents_->GetRenderViewHost()); |
| 247 } | 247 } |
| OLD | NEW |