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 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" | 9 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" |
10 #include "chrome/browser/devtools/devtools_toggle_action.h" | 10 #include "chrome/browser/devtools/devtools_toggle_action.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 }; | 239 }; |
240 | 240 |
241 enum FrontendType { | 241 enum FrontendType { |
242 kFrontendDefault, | 242 kFrontendDefault, |
243 kFrontendRemote, | 243 kFrontendRemote, |
244 kFrontendWorker, | 244 kFrontendWorker, |
245 kFrontendV8, | 245 kFrontendV8, |
246 kFrontendNode | 246 kFrontendNode |
247 }; | 247 }; |
248 | 248 |
249 DevToolsWindow(FrontendType frontend_type, | 249 DevToolsWindow(Profile* profile, |
250 Profile* profile, | |
251 content::WebContents* main_web_contents, | 250 content::WebContents* main_web_contents, |
252 DevToolsUIBindings* bindings, | 251 DevToolsUIBindings* bindings, |
253 content::WebContents* inspected_web_contents, | 252 content::WebContents* inspected_web_contents, |
254 bool can_dock); | 253 bool can_dock); |
255 | 254 |
256 // External frontend is always undocked. | 255 // External frontend is always undocked. |
257 static void OpenExternalFrontend( | 256 static void OpenExternalFrontend( |
258 Profile* profile, | 257 Profile* profile, |
259 const std::string& frontend_uri, | 258 const std::string& frontend_uri, |
260 const scoped_refptr<content::DevToolsAgentHost>& agent_host, | 259 const scoped_refptr<content::DevToolsAgentHost>& agent_host, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 BrowserWindow* GetInspectedBrowserWindow(); | 340 BrowserWindow* GetInspectedBrowserWindow(); |
342 void ScheduleShow(const DevToolsToggleAction& action); | 341 void ScheduleShow(const DevToolsToggleAction& action); |
343 void Show(const DevToolsToggleAction& action); | 342 void Show(const DevToolsToggleAction& action); |
344 void DoAction(const DevToolsToggleAction& action); | 343 void DoAction(const DevToolsToggleAction& action); |
345 void LoadCompleted(); | 344 void LoadCompleted(); |
346 void UpdateBrowserToolbar(); | 345 void UpdateBrowserToolbar(); |
347 void UpdateBrowserWindow(); | 346 void UpdateBrowserWindow(); |
348 | 347 |
349 std::unique_ptr<ObserverWithAccessor> inspected_contents_observer_; | 348 std::unique_ptr<ObserverWithAccessor> inspected_contents_observer_; |
350 | 349 |
351 FrontendType frontend_type_; | |
352 Profile* profile_; | 350 Profile* profile_; |
353 content::WebContents* main_web_contents_; | 351 content::WebContents* main_web_contents_; |
354 content::WebContents* toolbox_web_contents_; | 352 content::WebContents* toolbox_web_contents_; |
355 DevToolsUIBindings* bindings_; | 353 DevToolsUIBindings* bindings_; |
356 Browser* browser_; | 354 Browser* browser_; |
357 bool is_docked_; | 355 bool is_docked_; |
358 const bool can_dock_; | 356 const bool can_dock_; |
359 bool close_on_detach_; | 357 bool close_on_detach_; |
360 LifeStage life_stage_; | 358 LifeStage life_stage_; |
361 DevToolsToggleAction action_on_load_; | 359 DevToolsToggleAction action_on_load_; |
362 DevToolsContentsResizingStrategy contents_resizing_strategy_; | 360 DevToolsContentsResizingStrategy contents_resizing_strategy_; |
363 // True if we're in the process of handling a beforeunload event originating | 361 // True if we're in the process of handling a beforeunload event originating |
364 // from the inspected webcontents, see InterceptPageBeforeUnload for details. | 362 // from the inspected webcontents, see InterceptPageBeforeUnload for details. |
365 bool intercepted_page_beforeunload_; | 363 bool intercepted_page_beforeunload_; |
366 base::Closure load_completed_callback_; | 364 base::Closure load_completed_callback_; |
367 base::Closure close_callback_; | 365 base::Closure close_callback_; |
368 bool ready_for_test_; | 366 bool ready_for_test_; |
369 base::Closure ready_for_test_callback_; | 367 base::Closure ready_for_test_callback_; |
370 | 368 |
371 base::TimeTicks inspect_element_start_time_; | 369 base::TimeTicks inspect_element_start_time_; |
372 std::unique_ptr<DevToolsEventForwarder> event_forwarder_; | 370 std::unique_ptr<DevToolsEventForwarder> event_forwarder_; |
373 std::unique_ptr<DevToolsEyeDropper> eye_dropper_; | 371 std::unique_ptr<DevToolsEyeDropper> eye_dropper_; |
374 | 372 |
375 friend class DevToolsEventForwarder; | 373 friend class DevToolsEventForwarder; |
376 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 374 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
377 }; | 375 }; |
378 | 376 |
379 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 377 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
OLD | NEW |