Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Side by Side Diff: chrome/browser/ui/panels/panel_host.h

Issue 10736037: Enable keyboard shortcuts and some menu commands for browserless Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/panels/panel_cocoa.mm ('k') | chrome/browser/ui/panels/panel_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/extensions/extension_function_dispatcher.h" 10 #include "chrome/browser/extensions/extension_function_dispatcher.h"
11 #include "content/public/browser/web_contents_delegate.h" 11 #include "content/public/browser/web_contents_delegate.h"
12 #include "content/public/browser/web_contents_observer.h" 12 #include "content/public/browser/web_contents_observer.h"
13 #include "content/public/common/page_zoom.h"
13 14
14 class ExtensionWindowController; 15 class ExtensionWindowController;
15 class FaviconTabHelper; 16 class FaviconTabHelper;
16 class GURL; 17 class GURL;
17 class Panel; 18 class Panel;
18 class Profile; 19 class Profile;
19 20
20 namespace content { 21 namespace content {
21 class WebContents; 22 class WebContents;
22 } 23 }
(...skipping 22 matching lines...) Expand all
45 virtual void NavigationStateChanged(const content::WebContents* source, 46 virtual void NavigationStateChanged(const content::WebContents* source,
46 unsigned changed_flags) OVERRIDE; 47 unsigned changed_flags) OVERRIDE;
47 virtual void ActivateContents(content::WebContents* contents) OVERRIDE; 48 virtual void ActivateContents(content::WebContents* contents) OVERRIDE;
48 virtual void DeactivateContents(content::WebContents* contents) OVERRIDE; 49 virtual void DeactivateContents(content::WebContents* contents) OVERRIDE;
49 virtual void LoadingStateChanged(content::WebContents* source) OVERRIDE; 50 virtual void LoadingStateChanged(content::WebContents* source) OVERRIDE;
50 virtual void CloseContents(content::WebContents* source) OVERRIDE; 51 virtual void CloseContents(content::WebContents* source) OVERRIDE;
51 virtual void MoveContents(content::WebContents* source, 52 virtual void MoveContents(content::WebContents* source,
52 const gfx::Rect& pos) OVERRIDE; 53 const gfx::Rect& pos) OVERRIDE;
53 virtual bool IsPopupOrPanel( 54 virtual bool IsPopupOrPanel(
54 const content::WebContents* source) const OVERRIDE; 55 const content::WebContents* source) const OVERRIDE;
56 virtual void ContentsZoomChange(bool zoom_in) OVERRIDE;
55 virtual bool IsApplication() const OVERRIDE; 57 virtual bool IsApplication() const OVERRIDE;
58 virtual bool HandleContextMenu(
59 const content::ContextMenuParams& params) OVERRIDE;
60 virtual void HandleKeyboardEvent(
61 const content::NativeWebKeyboardEvent& event) OVERRIDE;
56 virtual void ResizeDueToAutoResize(content::WebContents* web_contents, 62 virtual void ResizeDueToAutoResize(content::WebContents* web_contents,
57 const gfx::Size& new_size) OVERRIDE; 63 const gfx::Size& new_size) OVERRIDE;
58 64
59 // content::WebContentsObserver overrides. 65 // content::WebContentsObserver overrides.
60 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; 66 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
61 virtual void WebContentsDestroyed( 67 virtual void WebContentsDestroyed(
62 content::WebContents* web_contents) OVERRIDE; 68 content::WebContents* web_contents) OVERRIDE;
63 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 69 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
64 70
65 // ExtensionFunctionDispatcher::Delegate overrides. 71 // ExtensionFunctionDispatcher::Delegate overrides.
66 virtual ExtensionWindowController* GetExtensionWindowController() const 72 virtual ExtensionWindowController* GetExtensionWindowController() const
67 OVERRIDE; 73 OVERRIDE;
68 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE; 74 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE;
69 75
76 // Actions on web contents.
77 void Reload();
78 void ReloadIgnoringCache();
79 void StopLoading();
80 void Zoom(content::PageZoom zoom);
81
70 private: 82 private:
71 // Helper to close panel via the message loop. 83 // Helper to close panel via the message loop.
72 void ClosePanel(); 84 void ClosePanel();
73 85
74 // Message handlers. 86 // Message handlers.
75 void OnRequest(const ExtensionHostMsg_Request_Params& params); 87 void OnRequest(const ExtensionHostMsg_Request_Params& params);
76 88
77 Panel* panel_; // Weak, owns us. 89 Panel* panel_; // Weak, owns us.
78 Profile* profile_; 90 Profile* profile_;
79 ExtensionFunctionDispatcher extension_function_dispatcher_; 91 ExtensionFunctionDispatcher extension_function_dispatcher_;
80 92
81 // The following factory is used to close the panel via the message loop. 93 // The following factory is used to close the panel via the message loop.
82 base::WeakPtrFactory<PanelHost> weak_factory_; 94 base::WeakPtrFactory<PanelHost> weak_factory_;
83 95
84 scoped_ptr<FaviconTabHelper> favicon_tab_helper_; 96 scoped_ptr<FaviconTabHelper> favicon_tab_helper_;
85 scoped_ptr<content::WebContents> web_contents_; 97 scoped_ptr<content::WebContents> web_contents_;
86 98
87 DISALLOW_COPY_AND_ASSIGN(PanelHost); 99 DISALLOW_COPY_AND_ASSIGN(PanelHost);
88 }; 100 };
89 101
90 #endif // CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_ 102 #endif // CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_cocoa.mm ('k') | chrome/browser/ui/panels/panel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698