| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/toolbar_view.h" | 5 #include "chrome/browser/views/toolbar_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/drag_drop_types.h" | 9 #include "app/drag_drop_types.h" |
| 10 #include "app/gfx/chrome_canvas.h" | 10 #include "app/gfx/canvas.h" |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| 12 #include "app/os_exchange_data.h" | 12 #include "app/os_exchange_data.h" |
| 13 #include "app/resource_bundle.h" | 13 #include "app/resource_bundle.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 17 #include "chrome/app/chrome_dll_resource.h" | 17 #include "chrome/app/chrome_dll_resource.h" |
| 18 #include "chrome/browser/bookmarks/bookmark_model.h" | 18 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 19 #include "chrome/browser/browser.h" | 19 #include "chrome/browser/browser.h" |
| 20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 child_height); | 396 child_height); |
| 397 next_menu_x += bookmark_menu_width; | 397 next_menu_x += bookmark_menu_width; |
| 398 } | 398 } |
| 399 | 399 |
| 400 page_menu_->SetBounds(next_menu_x, child_y, page_menu_width, child_height); | 400 page_menu_->SetBounds(next_menu_x, child_y, page_menu_width, child_height); |
| 401 next_menu_x += page_menu_width; | 401 next_menu_x += page_menu_width; |
| 402 | 402 |
| 403 app_menu_->SetBounds(next_menu_x, child_y, app_menu_width, child_height); | 403 app_menu_->SetBounds(next_menu_x, child_y, app_menu_width, child_height); |
| 404 } | 404 } |
| 405 | 405 |
| 406 void BrowserToolbarView::Paint(ChromeCanvas* canvas) { | 406 void BrowserToolbarView::Paint(gfx::Canvas* canvas) { |
| 407 View::Paint(canvas); | 407 View::Paint(canvas); |
| 408 | 408 |
| 409 if (IsDisplayModeNormal()) | 409 if (IsDisplayModeNormal()) |
| 410 return; | 410 return; |
| 411 | 411 |
| 412 // In maximized mode, we don't draw the endcaps on the location bar, because | 412 // In maximized mode, we don't draw the endcaps on the location bar, because |
| 413 // when they're flush against the edge of the screen they just look glitchy. | 413 // when they're flush against the edge of the screen they just look glitchy. |
| 414 if (!browser_->window() || !browser_->window()->IsMaximized()) { | 414 if (!browser_->window() || !browser_->window()->IsMaximized()) { |
| 415 int top_spacing = PopupTopSpacing(); | 415 int top_spacing = PopupTopSpacing(); |
| 416 canvas->DrawBitmapInt(*kPopupBackgroundEdge, 0, top_spacing); | 416 canvas->DrawBitmapInt(*kPopupBackgroundEdge, 0, top_spacing); |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 case IDC_COPY: | 945 case IDC_COPY: |
| 946 *accel = views::Accelerator(L'C', false, true, false); | 946 *accel = views::Accelerator(L'C', false, true, false); |
| 947 return true; | 947 return true; |
| 948 case IDC_PASTE: | 948 case IDC_PASTE: |
| 949 *accel = views::Accelerator(L'V', false, true, false); | 949 *accel = views::Accelerator(L'V', false, true, false); |
| 950 return true; | 950 return true; |
| 951 } | 951 } |
| 952 // Else, we retrieve the accelerator information from the frame. | 952 // Else, we retrieve the accelerator information from the frame. |
| 953 return GetWidget()->GetAccelerator(id, accel); | 953 return GetWidget()->GetAccelerator(id, accel); |
| 954 } | 954 } |
| OLD | NEW |