| Index: chrome/browser/automation/automation_provider.cc
|
| ===================================================================
|
| --- chrome/browser/automation/automation_provider.cc (revision 1688)
|
| +++ chrome/browser/automation/automation_provider.cc (working copy)
|
| @@ -23,6 +23,7 @@
|
| #include "chrome/browser/save_package.h"
|
| #include "chrome/browser/ssl_blocking_page.h"
|
| #include "chrome/browser/web_contents.h"
|
| +#include "chrome/browser/views/bookmark_bar_view.h"
|
| #include "chrome/browser/views/location_bar_view.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/test/automation/automation_messages.h"
|
| @@ -755,6 +756,8 @@
|
| GetFindWindowVisibility)
|
| IPC_MESSAGE_HANDLER(AutomationMsg_FindWindowLocationRequest,
|
| HandleFindWindowLocationRequest)
|
| + IPC_MESSAGE_HANDLER(AutomationMsg_BookmarkBarVisibilityRequest,
|
| + GetBookmarkBarVisitility)
|
| IPC_END_MESSAGE_MAP()
|
| }
|
|
|
| @@ -1720,6 +1723,27 @@
|
| x, y));
|
| }
|
|
|
| +void AutomationProvider::GetBookmarkBarVisitility(const IPC::Message& message,
|
| + int handle) {
|
| + bool visible = false;
|
| + bool animating = false;
|
| +
|
| + void* iter = NULL;
|
| + if (browser_tracker_->ContainsHandle(handle)) {
|
| + Browser* browser = browser_tracker_->GetResource(handle);
|
| + if (browser) {
|
| + BookmarkBarView* bookmark_bar = browser->window()->GetBookmarkBarView();
|
| + if (bookmark_bar) {
|
| + animating = bookmark_bar->IsAnimating();
|
| + visible = browser->window()->IsBookmarkBarVisible();
|
| + }
|
| + }
|
| + }
|
| +
|
| + Send(new AutomationMsg_BookmarkBarVisibilityResponse(message.routing_id(),
|
| + visible, animating));
|
| +}
|
| +
|
| void AutomationProvider::HandleInspectElementRequest(
|
| const IPC::Message& message, int handle, int x, int y) {
|
| WebContents* web_contents = GetWebContentsForHandle(handle, NULL);
|
|
|