| 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/devtools/devtools_window.h" | 5 #include "chrome/browser/devtools/devtools_window.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 | 8 | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" | 
| (...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1474   if (inspected_window) | 1474   if (inspected_window) | 
| 1475     inspected_window->UpdateToolbar(NULL); | 1475     inspected_window->UpdateToolbar(NULL); | 
| 1476 } | 1476 } | 
| 1477 | 1477 | 
| 1478 content::WebContents* DevToolsWindow::GetInspectedWebContents() { | 1478 content::WebContents* DevToolsWindow::GetInspectedWebContents() { | 
| 1479   return inspected_contents_observer_ ? | 1479   return inspected_contents_observer_ ? | 
| 1480       inspected_contents_observer_->web_contents() : NULL; | 1480       inspected_contents_observer_->web_contents() : NULL; | 
| 1481 } | 1481 } | 
| 1482 | 1482 | 
| 1483 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() { | 1483 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() { | 
| 1484   // Load is completed when both kIsDockedSet and kOnLoadFired happened. | 1484   // We could be in kLoadCompleted state already if frontend reloads itself. | 
| 1485   // Here we set kOnLoadFired. | 1485   if (load_state_ != kLoadCompleted) { | 
| 1486   load_state_ = load_state_ == kIsDockedSet ? kLoadCompleted : kOnLoadFired; | 1486     // Load is completed when both kIsDockedSet and kOnLoadFired happened. | 
|  | 1487     // Here we set kOnLoadFired. | 
|  | 1488     load_state_ = load_state_ == kIsDockedSet ? kLoadCompleted : kOnLoadFired; | 
|  | 1489   } | 
| 1487   if (load_state_ == kLoadCompleted) | 1490   if (load_state_ == kLoadCompleted) | 
| 1488     LoadCompleted(); | 1491     LoadCompleted(); | 
| 1489 } | 1492 } | 
| 1490 | 1493 | 
| 1491 void DevToolsWindow::LoadCompleted() { | 1494 void DevToolsWindow::LoadCompleted() { | 
| 1492   Show(action_on_load_); | 1495   Show(action_on_load_); | 
| 1493   action_on_load_ = DevToolsToggleAction::NoOp(); | 1496   action_on_load_ = DevToolsToggleAction::NoOp(); | 
| 1494   UpdateTheme(); | 1497   UpdateTheme(); | 
| 1495   AddDevToolsExtensionsToClient(); | 1498   AddDevToolsExtensionsToClient(); | 
| 1496 } | 1499 } | 
| OLD | NEW | 
|---|