| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/gtk/browser_window_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include "base/base_paths_linux.h" | 9 #include "base/base_paths_linux.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/gfx/gtk_util.h" | 11 #include "base/gfx/gtk_util.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| 17 #include "chrome/app/chrome_dll_resource.h" | 17 #include "chrome/app/chrome_dll_resource.h" |
| 18 #include "chrome/browser/bookmarks/bookmark_utils.h" | 18 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 19 #include "chrome/browser/browser.h" | 19 #include "chrome/browser/browser.h" |
| 20 #include "chrome/browser/browser_list.h" | 20 #include "chrome/browser/browser_list.h" |
| 21 #include "chrome/browser/gtk/bookmark_bar_gtk.h" | 21 #include "chrome/browser/gtk/bookmark_bar_gtk.h" |
| 22 #include "chrome/browser/gtk/browser_toolbar_gtk.h" | 22 #include "chrome/browser/gtk/browser_toolbar_gtk.h" |
| 23 #include "chrome/browser/gtk/go_button_gtk.h" |
| 23 #include "chrome/browser/gtk/infobar_container_gtk.h" | 24 #include "chrome/browser/gtk/infobar_container_gtk.h" |
| 24 #include "chrome/browser/gtk/find_bar_gtk.h" | 25 #include "chrome/browser/gtk/find_bar_gtk.h" |
| 25 #include "chrome/browser/gtk/status_bubble_gtk.h" | 26 #include "chrome/browser/gtk/status_bubble_gtk.h" |
| 26 #include "chrome/browser/gtk/tab_contents_container_gtk.h" | 27 #include "chrome/browser/gtk/tab_contents_container_gtk.h" |
| 27 #include "chrome/browser/gtk/tabs/tab_strip_gtk.h" | 28 #include "chrome/browser/gtk/tabs/tab_strip_gtk.h" |
| 28 #include "chrome/browser/gtk/toolbar_star_toggle_gtk.h" | 29 #include "chrome/browser/gtk/toolbar_star_toggle_gtk.h" |
| 29 #include "chrome/browser/location_bar.h" | 30 #include "chrome/browser/location_bar.h" |
| 30 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" | 31 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" |
| 31 #include "chrome/browser/tab_contents/web_contents.h" | 32 #include "chrome/browser/tab_contents/web_contents.h" |
| 32 #include "chrome/browser/tab_contents/web_contents_view.h" | 33 #include "chrome/browser/tab_contents/web_contents_view.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 407 |
| 407 LocationBar* BrowserWindowGtk::GetLocationBar() const { | 408 LocationBar* BrowserWindowGtk::GetLocationBar() const { |
| 408 return toolbar_->GetLocationBar(); | 409 return toolbar_->GetLocationBar(); |
| 409 } | 410 } |
| 410 | 411 |
| 411 void BrowserWindowGtk::SetFocusToLocationBar() { | 412 void BrowserWindowGtk::SetFocusToLocationBar() { |
| 412 GetLocationBar()->FocusLocation(); | 413 GetLocationBar()->FocusLocation(); |
| 413 } | 414 } |
| 414 | 415 |
| 415 void BrowserWindowGtk::UpdateStopGoState(bool is_loading) { | 416 void BrowserWindowGtk::UpdateStopGoState(bool is_loading) { |
| 416 // Need to implement stop/go button. | 417 toolbar_->GetGoButton()->ChangeMode( |
| 417 // http://code.google.com/p/chromium/issues/detail?id=9381 | 418 is_loading ? GoButtonGtk::MODE_STOP : GoButtonGtk::MODE_GO); |
| 418 } | 419 } |
| 419 | 420 |
| 420 void BrowserWindowGtk::UpdateToolbar(TabContents* contents, | 421 void BrowserWindowGtk::UpdateToolbar(TabContents* contents, |
| 421 bool should_restore_state) { | 422 bool should_restore_state) { |
| 422 toolbar_->UpdateTabContents(contents, should_restore_state); | 423 toolbar_->UpdateTabContents(contents, should_restore_state); |
| 423 } | 424 } |
| 424 | 425 |
| 425 void BrowserWindowGtk::FocusToolbar() { | 426 void BrowserWindowGtk::FocusToolbar() { |
| 426 NOTIMPLEMENTED(); | 427 NOTIMPLEMENTED(); |
| 427 } | 428 } |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 } else { | 658 } else { |
| 658 browser_window->ExecuteBrowserCommand(command_id); | 659 browser_window->ExecuteBrowserCommand(command_id); |
| 659 } | 660 } |
| 660 | 661 |
| 661 return TRUE; | 662 return TRUE; |
| 662 } | 663 } |
| 663 | 664 |
| 664 void BrowserWindowGtk::ExecuteBrowserCommand(int id) { | 665 void BrowserWindowGtk::ExecuteBrowserCommand(int id) { |
| 665 browser_->ExecuteCommand(id); | 666 browser_->ExecuteCommand(id); |
| 666 } | 667 } |
| OLD | NEW |