| 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/browser/chrome_page_zoom.h" | 9 #include "chrome/browser/chrome_page_zoom.h" |
| 10 #include "chrome/browser/favicon/favicon_tab_helper.h" | 10 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 149 } |
| 150 | 150 |
| 151 void PanelHost::OnRequest(const ExtensionHostMsg_Request_Params& params) { | 151 void PanelHost::OnRequest(const ExtensionHostMsg_Request_Params& params) { |
| 152 if (!web_contents_.get()) | 152 if (!web_contents_.get()) |
| 153 return; | 153 return; |
| 154 | 154 |
| 155 extension_function_dispatcher_.Dispatch(params, | 155 extension_function_dispatcher_.Dispatch(params, |
| 156 web_contents_->GetRenderViewHost()); | 156 web_contents_->GetRenderViewHost()); |
| 157 } | 157 } |
| 158 | 158 |
| 159 ExtensionWindowController* PanelHost::GetExtensionWindowController() const { | 159 extensions::WindowController* PanelHost::GetExtensionWindowController() const { |
| 160 return panel_->extension_window_controller(); | 160 return panel_->extension_window_controller(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 content::WebContents* PanelHost::GetAssociatedWebContents() const { | 163 content::WebContents* PanelHost::GetAssociatedWebContents() const { |
| 164 return web_contents_.get(); | 164 return web_contents_.get(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void PanelHost::Reload() { | 167 void PanelHost::Reload() { |
| 168 content::RecordAction(UserMetricsAction("Reload")); | 168 content::RecordAction(UserMetricsAction("Reload")); |
| 169 web_contents_->GetController().Reload(true); | 169 web_contents_->GetController().Reload(true); |
| 170 } | 170 } |
| 171 | 171 |
| 172 void PanelHost::ReloadIgnoringCache() { | 172 void PanelHost::ReloadIgnoringCache() { |
| 173 content::RecordAction(UserMetricsAction("ReloadIgnoringCache")); | 173 content::RecordAction(UserMetricsAction("ReloadIgnoringCache")); |
| 174 web_contents_->GetController().ReloadIgnoringCache(true); | 174 web_contents_->GetController().ReloadIgnoringCache(true); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void PanelHost::StopLoading() { | 177 void PanelHost::StopLoading() { |
| 178 content::RecordAction(UserMetricsAction("Stop")); | 178 content::RecordAction(UserMetricsAction("Stop")); |
| 179 web_contents_->Stop(); | 179 web_contents_->Stop(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void PanelHost::Zoom(content::PageZoom zoom) { | 182 void PanelHost::Zoom(content::PageZoom zoom) { |
| 183 chrome_page_zoom::Zoom(web_contents_.get(), zoom); | 183 chrome_page_zoom::Zoom(web_contents_.get(), zoom); |
| 184 } | 184 } |
| OLD | NEW |