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

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

Issue 1169223002: [Extensions] Clean up the handling of ExtensionHostMsg_Request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 6 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
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 "content/public/browser/web_contents_delegate.h" 10 #include "content/public/browser/web_contents_delegate.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void HandleKeyboardEvent( 70 void HandleKeyboardEvent(
71 content::WebContents* source, 71 content::WebContents* source,
72 const content::NativeWebKeyboardEvent& event) override; 72 const content::NativeWebKeyboardEvent& event) override;
73 void ResizeDueToAutoResize(content::WebContents* web_contents, 73 void ResizeDueToAutoResize(content::WebContents* web_contents,
74 const gfx::Size& new_size) override; 74 const gfx::Size& new_size) override;
75 75
76 // content::WebContentsObserver overrides. 76 // content::WebContentsObserver overrides.
77 void RenderViewCreated(content::RenderViewHost* render_view_host) override; 77 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
78 void RenderProcessGone(base::TerminationStatus status) override; 78 void RenderProcessGone(base::TerminationStatus status) override;
79 void WebContentsDestroyed() override; 79 void WebContentsDestroyed() override;
80 bool OnMessageReceived(const IPC::Message& message) override;
81 80
82 // extensions::ExtensionFunctionDispatcher::Delegate overrides. 81 // extensions::ExtensionFunctionDispatcher::Delegate overrides.
83 extensions::WindowController* GetExtensionWindowController() const override; 82 extensions::WindowController* GetExtensionWindowController() const override;
84 content::WebContents* GetAssociatedWebContents() const override; 83 content::WebContents* GetAssociatedWebContents() const override;
85 84
86 // Actions on web contents. 85 // Actions on web contents.
87 void Reload(); 86 void Reload();
88 void ReloadIgnoringCache(); 87 void ReloadIgnoringCache();
89 void StopLoading(); 88 void StopLoading();
90 void Zoom(content::PageZoom zoom); 89 void Zoom(content::PageZoom zoom);
91 90
92 private: 91 private:
93 // Helper to close panel via the message loop. 92 // Helper to close panel via the message loop.
94 void ClosePanel(); 93 void ClosePanel();
95 94
96 // Message handlers.
97 void OnRequest(const ExtensionHostMsg_Request_Params& params);
98
99 Panel* panel_; // Weak, owns us. 95 Panel* panel_; // Weak, owns us.
100 Profile* profile_; 96 Profile* profile_;
101 extensions::ExtensionFunctionDispatcher extension_function_dispatcher_;
102 97
103 scoped_ptr<content::WebContents> web_contents_; 98 scoped_ptr<content::WebContents> web_contents_;
104 99
105 // The following factory is used to close the panel via the message loop. 100 // The following factory is used to close the panel via the message loop.
106 base::WeakPtrFactory<PanelHost> weak_factory_; 101 base::WeakPtrFactory<PanelHost> weak_factory_;
107 102
108 DISALLOW_COPY_AND_ASSIGN(PanelHost); 103 DISALLOW_COPY_AND_ASSIGN(PanelHost);
109 }; 104 };
110 105
111 #endif // CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_ 106 #endif // CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698