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/panels/panel_host.h" | 5 #include "chrome/browser/ui/panels/panel_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "chrome/browser/chrome_page_zoom.h" | 10 #include "chrome/browser/chrome_page_zoom.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 bool PanelHost::IsApplication() const { | 112 bool PanelHost::IsApplication() const { |
113 return true; | 113 return true; |
114 } | 114 } |
115 | 115 |
116 bool PanelHost::HandleContextMenu(const content::ContextMenuParams& params) { | 116 bool PanelHost::HandleContextMenu(const content::ContextMenuParams& params) { |
117 return true; // Disallow context menu. | 117 return true; // Disallow context menu. |
118 } | 118 } |
119 | 119 |
120 void PanelHost::HandleKeyboardEvent( | 120 void PanelHost::HandleKeyboardEvent( |
| 121 content::WebContents* source, |
121 const content::NativeWebKeyboardEvent& event) { | 122 const content::NativeWebKeyboardEvent& event) { |
122 return panel_->HandleKeyboardEvent(event); | 123 return panel_->HandleKeyboardEvent(event); |
123 } | 124 } |
124 | 125 |
125 void PanelHost::WebContentsFocused(content::WebContents* contents) { | 126 void PanelHost::WebContentsFocused(content::WebContents* contents) { |
126 panel_->WebContentsFocused(contents); | 127 panel_->WebContentsFocused(contents); |
127 } | 128 } |
128 | 129 |
129 void PanelHost::ResizeDueToAutoResize(content::WebContents* web_contents, | 130 void PanelHost::ResizeDueToAutoResize(content::WebContents* web_contents, |
130 const gfx::Size& new_size) { | 131 const gfx::Size& new_size) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 } | 185 } |
185 | 186 |
186 void PanelHost::StopLoading() { | 187 void PanelHost::StopLoading() { |
187 content::RecordAction(UserMetricsAction("Stop")); | 188 content::RecordAction(UserMetricsAction("Stop")); |
188 web_contents_->Stop(); | 189 web_contents_->Stop(); |
189 } | 190 } |
190 | 191 |
191 void PanelHost::Zoom(content::PageZoom zoom) { | 192 void PanelHost::Zoom(content::PageZoom zoom) { |
192 chrome_page_zoom::Zoom(web_contents_.get(), zoom); | 193 chrome_page_zoom::Zoom(web_contents_.get(), zoom); |
193 } | 194 } |
OLD | NEW |