| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEBUI_DEVTOOLS_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_DEVTOOLS_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_DEVTOOLS_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_DEVTOOLS_UI_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chrome/browser/devtools/device/devtools_android_bridge.h" | 10 #include "chrome/browser/devtools/device/devtools_android_bridge.h" |
| 11 #include "chrome/browser/devtools/devtools_ui_bindings.h" | 11 #include "chrome/browser/devtools/devtools_ui_bindings.h" |
| 12 #include "content/public/browser/web_contents_observer.h" | 12 #include "content/public/browser/web_contents_observer.h" |
| 13 #include "content/public/browser/web_ui_controller.h" | 13 #include "content/public/browser/web_ui_controller.h" |
| 14 | 14 |
| 15 class Profile; | 15 class Profile; |
| 16 | 16 |
| 17 class DevToolsUI : public content::WebUIController, | 17 class DevToolsUI : public content::WebUIController, |
| 18 public content::WebContentsObserver { | 18 public content::WebContentsObserver { |
| 19 public: | 19 public: |
| 20 static GURL GetProxyURL(const std::string& frontend_url); | 20 static GURL GetProxyURL(const std::string& frontend_url); |
| 21 static GURL GetRemoteBaseURL(); |
| 21 | 22 |
| 22 explicit DevToolsUI(content::WebUI* web_ui); | 23 explicit DevToolsUI(content::WebUI* web_ui); |
| 23 ~DevToolsUI() override; | 24 ~DevToolsUI() override; |
| 24 | 25 |
| 25 // content::WebContentsObserver overrides. | 26 // content::WebContentsObserver overrides. |
| 26 void NavigationEntryCommitted( | 27 void NavigationEntryCommitted( |
| 27 const content::LoadCommittedDetails& load_details) override; | 28 const content::LoadCommittedDetails& load_details) override; |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 void RemotePageOpened(const GURL& virtual_url, | 31 void RemotePageOpened(const GURL& virtual_url, |
| 31 scoped_refptr<DevToolsAndroidBridge::RemotePage> page); | 32 scoped_refptr<DevToolsAndroidBridge::RemotePage> page); |
| 32 | 33 |
| 33 DevToolsUIBindings bindings_; | 34 DevToolsUIBindings bindings_; |
| 34 GURL remote_frontend_loading_url_; | 35 GURL remote_frontend_loading_url_; |
| 35 GURL remote_page_opening_url_; | 36 GURL remote_page_opening_url_; |
| 36 base::WeakPtrFactory<DevToolsUI> weak_factory_; | 37 base::WeakPtrFactory<DevToolsUI> weak_factory_; |
| 37 DISALLOW_COPY_AND_ASSIGN(DevToolsUI); | 38 DISALLOW_COPY_AND_ASSIGN(DevToolsUI); |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 #endif // CHROME_BROWSER_UI_WEBUI_DEVTOOLS_UI_H_ | 41 #endif // CHROME_BROWSER_UI_WEBUI_DEVTOOLS_UI_H_ |
| OLD | NEW |