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

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

Issue 10736037: Enable keyboard shortcuts and some menu commands for browserless Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 #include "chrome/browser/ui/panels/panel_host.h" 5 #include "chrome/browser/ui/panels/panel_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 void PanelHost::MoveContents(content::WebContents* source, 90 void PanelHost::MoveContents(content::WebContents* source,
91 const gfx::Rect& pos) { 91 const gfx::Rect& pos) {
92 panel_->SetBounds(pos); 92 panel_->SetBounds(pos);
93 } 93 }
94 94
95 bool PanelHost::IsPopupOrPanel(const content::WebContents* source) const { 95 bool PanelHost::IsPopupOrPanel(const content::WebContents* source) const {
96 return true; 96 return true;
97 } 97 }
98 98
99 void PanelHost::ContentsZoomChange(bool zoom_in) {
100 panel_->ContentsZoomChange(zoom_in);
101 }
102
99 bool PanelHost::IsApplication() const { 103 bool PanelHost::IsApplication() const {
100 return true; 104 return true;
101 } 105 }
102 106
107 bool PanelHost::HandleContextMenu(const content::ContextMenuParams& params) {
108 return true; // Disallow context menu.
109 }
110
111 void PanelHost::HandleKeyboardEvent(
112 const content::NativeWebKeyboardEvent& event) {
113 return panel_->HandleKeyboardEvent(event);
114 }
115
103 void PanelHost::ResizeDueToAutoResize(content::WebContents* web_contents, 116 void PanelHost::ResizeDueToAutoResize(content::WebContents* web_contents,
104 const gfx::Size& new_size) { 117 const gfx::Size& new_size) {
105 panel_->OnContentsAutoResized(new_size); 118 panel_->OnContentsAutoResized(new_size);
106 } 119 }
107 120
108 void PanelHost::RenderViewGone(base::TerminationStatus status) { 121 void PanelHost::RenderViewGone(base::TerminationStatus status) {
109 CloseContents(web_contents_.get()); 122 CloseContents(web_contents_.get());
110 } 123 }
111 124
112 void PanelHost::WebContentsDestroyed(content::WebContents* web_contents) { 125 void PanelHost::WebContentsDestroyed(content::WebContents* web_contents) {
(...skipping 26 matching lines...) Expand all
139 web_contents_->GetRenderViewHost()); 152 web_contents_->GetRenderViewHost());
140 } 153 }
141 154
142 ExtensionWindowController* PanelHost::GetExtensionWindowController() const { 155 ExtensionWindowController* PanelHost::GetExtensionWindowController() const {
143 return panel_->extension_window_controller(); 156 return panel_->extension_window_controller();
144 } 157 }
145 158
146 content::WebContents* PanelHost::GetAssociatedWebContents() const { 159 content::WebContents* PanelHost::GetAssociatedWebContents() const {
147 return web_contents_.get(); 160 return web_contents_.get();
148 } 161 }
OLDNEW
« chrome/browser/ui/panels/panel.cc ('K') | « chrome/browser/ui/panels/panel_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698