| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 // BrowserView, public: | 418 // BrowserView, public: |
| 419 | 419 |
| 420 // static | 420 // static |
| 421 void BrowserView::SetShowState(int state) { | 421 void BrowserView::SetShowState(int state) { |
| 422 explicit_show_state = state; | 422 explicit_show_state = state; |
| 423 } | 423 } |
| 424 | 424 |
| 425 BrowserView::BrowserView(Browser* browser) | 425 BrowserView::BrowserView(Browser* browser) |
| 426 : views::ClientView(NULL, NULL), | 426 : views::ClientView(NULL, NULL), |
| 427 last_focused_view_storage_id_( | 427 last_focused_view_storage_id_( |
| 428 views::ViewStorage::GetSharedInstance()->CreateStorageID()), | 428 views::ViewStorage::GetInstance()->CreateStorageID()), |
| 429 frame_(NULL), | 429 frame_(NULL), |
| 430 browser_(browser), | 430 browser_(browser), |
| 431 active_bookmark_bar_(NULL), | 431 active_bookmark_bar_(NULL), |
| 432 tabstrip_(NULL), | 432 tabstrip_(NULL), |
| 433 toolbar_(NULL), | 433 toolbar_(NULL), |
| 434 infobar_container_(NULL), | 434 infobar_container_(NULL), |
| 435 sidebar_container_(NULL), | 435 sidebar_container_(NULL), |
| 436 sidebar_split_(NULL), | 436 sidebar_split_(NULL), |
| 437 contents_container_(NULL), | 437 contents_container_(NULL), |
| 438 devtools_container_(NULL), | 438 devtools_container_(NULL), |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 break; | 976 break; |
| 977 } | 977 } |
| 978 } else { | 978 } else { |
| 979 accessible_views[index]->RequestFocus(); | 979 accessible_views[index]->RequestFocus(); |
| 980 break; | 980 break; |
| 981 } | 981 } |
| 982 } | 982 } |
| 983 } | 983 } |
| 984 | 984 |
| 985 void BrowserView::SaveFocusedView() { | 985 void BrowserView::SaveFocusedView() { |
| 986 views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance(); | 986 views::ViewStorage* view_storage = views::ViewStorage::GetInstance(); |
| 987 if (view_storage->RetrieveView(last_focused_view_storage_id_)) | 987 if (view_storage->RetrieveView(last_focused_view_storage_id_)) |
| 988 view_storage->RemoveView(last_focused_view_storage_id_); | 988 view_storage->RemoveView(last_focused_view_storage_id_); |
| 989 views::View* focused_view = GetRootView()->GetFocusedView(); | 989 views::View* focused_view = GetRootView()->GetFocusedView(); |
| 990 if (focused_view) | 990 if (focused_view) |
| 991 view_storage->StoreView(last_focused_view_storage_id_, focused_view); | 991 view_storage->StoreView(last_focused_view_storage_id_, focused_view); |
| 992 } | 992 } |
| 993 | 993 |
| 994 void BrowserView::DestroyBrowser() { | 994 void BrowserView::DestroyBrowser() { |
| 995 // Explicitly delete the BookmarkBarView now. That way we don't have to | 995 // Explicitly delete the BookmarkBarView now. That way we don't have to |
| 996 // worry about the BookmarkBarView potentially outliving the Browser & | 996 // worry about the BookmarkBarView potentially outliving the Browser & |
| (...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); | 2508 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); |
| 2509 | 2509 |
| 2510 return view; | 2510 return view; |
| 2511 } | 2511 } |
| 2512 #endif | 2512 #endif |
| 2513 | 2513 |
| 2514 // static | 2514 // static |
| 2515 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2515 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
| 2516 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2516 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
| 2517 } | 2517 } |
| OLD | NEW |