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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/json/json_writer.h" | 6 #include "base/json/json_writer.h" |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // Create TabContents with devtools. | 68 // Create TabContents with devtools. |
69 tab_contents_ = | 69 tab_contents_ = |
70 Browser::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); | 70 Browser::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); |
71 tab_contents_->tab_contents()-> | 71 tab_contents_->tab_contents()-> |
72 render_view_host()->AllowBindings(BindingsPolicy::WEB_UI); | 72 render_view_host()->AllowBindings(BindingsPolicy::WEB_UI); |
73 tab_contents_->controller().LoadURL( | 73 tab_contents_->controller().LoadURL( |
74 GetDevToolsUrl(), GURL(), PageTransition::START_PAGE); | 74 GetDevToolsUrl(), GURL(), PageTransition::START_PAGE); |
75 | 75 |
76 // Wipe out page icon so that the default application icon is used. | 76 // Wipe out page icon so that the default application icon is used. |
77 NavigationEntry* entry = tab_contents_->controller().GetActiveEntry(); | 77 NavigationEntry* entry = tab_contents_->controller().GetActiveEntry(); |
78 entry->favicon().set_bitmap(SkBitmap()); | 78 entry->GetFavicon(history::FAVICON).set_bitmap(SkBitmap()); |
79 entry->favicon().set_is_valid(true); | 79 entry->GetFavicon(history::FAVICON).set_is_valid(true); |
80 | 80 |
81 // Register on-load actions. | 81 // Register on-load actions. |
82 registrar_.Add(this, | 82 registrar_.Add(this, |
83 NotificationType::LOAD_STOP, | 83 NotificationType::LOAD_STOP, |
84 Source<NavigationController>(&tab_contents_->controller())); | 84 Source<NavigationController>(&tab_contents_->controller())); |
85 registrar_.Add(this, | 85 registrar_.Add(this, |
86 NotificationType::TAB_CLOSING, | 86 NotificationType::TAB_CLOSING, |
87 Source<NavigationController>(&tab_contents_->controller())); | 87 Source<NavigationController>(&tab_contents_->controller())); |
88 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, | 88 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, |
89 NotificationService::AllSources()); | 89 NotificationService::AllSources()); |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 return false; | 437 return false; |
438 } | 438 } |
439 | 439 |
440 void DevToolsWindow::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 440 void DevToolsWindow::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
441 if (docked_) { | 441 if (docked_) { |
442 BrowserWindow* inspected_window = GetInspectedBrowserWindow(); | 442 BrowserWindow* inspected_window = GetInspectedBrowserWindow(); |
443 if (inspected_window) | 443 if (inspected_window) |
444 inspected_window->HandleKeyboardEvent(event); | 444 inspected_window->HandleKeyboardEvent(event); |
445 } | 445 } |
446 } | 446 } |
OLD | NEW |